<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="me.linczh.bank.bean.OperatorBean" %>
<%@ page import="me.linczh.bank.bean.enums.ResultType" %>

<p>
	<%=request.getAttribute("contentpage") %>
</p>
<% if (request.getAttribute("result") != null) {
			ResultType result = (ResultType)request.getAttribute("result");
			if (result != ResultType.SUCCESS) {
 %>
<div class="alert alert-danger">
 <strong>操作失败</strong><br> <%=ResultType.parse(result) %> <a href="viewpage.action?page=account/password" class="alert-link">重新填写</a>
</div>
<%		} else { %>
<div class="alert alert-success">
  <strong>操作成功</strong><br> 修改成功!
</div>
<%		}
	} else {
		if (request.getAttribute("operators") != null) {
			List<OperatorBean> operators = (List<OperatorBean>) request.getAttribute("operators");
			for (OperatorBean o : operators) { %>
<p>
	[<%=o.getAccount() %>]&nbsp;
	<%=o.getUsername() %>(<%=o.getPassword() %>):
	<%=o.getIdentity() %>
</p>
<%		}
		} else { %>
<form action="operator.query.action" method="POST" role="form">
	<fieldset>
		<legend>查询操作人</legend>
		<div class="form-group">
	    <label for="account">企业账号</label>
	    <input type="text" class="form-control" id="account" name="account" placeholder="企业账号">
	  </div>
	  <div class="form-group">
	    <label for="password">开户密码</label>
	    <input type="password" class="form-control" id="password" name="password" placeholder="开户密码">
	  </div>
	</fieldset>
	<button type="submit" class="btn btn-default">查询</button>
</form>
<%	} %>
<form action="operator.delete.action" method="POST" role="form">
	<fieldset>
		<legend>删除操作人</legend>
		<div class="form-group">
	    <label for="account">企业账号</label>
	    <input type="text" class="form-control" id="account" name="account" placeholder="企业账号">
	  </div>
	  <div class="form-group">
	    <label for="password">开户密码</label>
	    <input type="password" class="form-control" id="password" name="password" placeholder="开户密码">
	  </div>
	  <div class="form-group">
	    <label for="identity">操作人身份证</label>
	    <input type="text" class="form-control" id="identity" name="identity" placeholder="操作人身份证">
	  </div>
	</fieldset>
	<button type="submit" class="btn btn-default">删除</button>
</form>
<form action="operator.create.action" method="POST" role="form">
	<fieldset>
		<legend>添加操作人</legend>
		<div class="form-group">
	    <label for="account">企业账号</label>
	    <input type="text" class="form-control" id="account" name="account" placeholder="企业账号">
	  </div>
	  <div class="form-group">
	    <label for="password">开户密码</label>
	    <input type="password" class="form-control" id="password" name="password" placeholder="开户密码">
	  </div>
	  <div class="form-group">
	    <label for="identity">操作人身份证</label>
	    <input type="text" class="form-control" id="identity" name="identity" placeholder="操作人身份证">
	  </div>
	  <div class="form-group">
	    <label for="username">操作人姓名</label>
	    <input type="text" class="form-control" id="username" name="username" placeholder="操作人姓名">
	  </div>
	  <div class="form-group">
	    <label for="newpassword">操作人密码</label>
	    <input type="password" class="form-control" id="newpassword" name="newpassword" placeholder="操作人密码">
	  </div>
	</fieldset>
	<button type="submit" class="btn btn-default">添加</button>
</form>
<% } %>